10. Quiz: Gather (Unzip File)
Gather: Unzip File
Move Zip File to Working Directory
Gather: Unzip File 1
Task
Task Description:
If you're coding along outside of the Udacity classroom:
Task Feedback:
Great! Let's move on to extracting our dataset by unzipping that file.
Unzipping Files Using Python
Gather: Unzip File 2
Quiz
Modify the file and mode parameters in the Jupyter Notebook below as described at the end of the above video. Here is the relevant zipfile documentation for reference.
If you fill out these parameters correctly and run the cell, when you click the jupyter logo in the top lefthand corner of the notebook, you will see the extracted contents of the zip file in the Jupyter Notebook dashboard.
Note: if you run the cell with the wrong mode parameter, you may have to reset the workspace (click MENU in the bottom lefthand corner then RESET DATA ) to restore the original state of the zip file.
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a
Quiz: File Parameter
QUESTION:
Get your code to work in the Jupyter Notebook above. What did you pass to the
file
parameter (the first argument) of the
zipfile.ZipFile
class constructor?
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
Quiz: Mode Parameter
QUESTION:
Get your code to work in the Jupyter Notebook above. What did you pass to the
mode
parameter (the second argument) of the
zipfile.ZipFile
class constructor?
SOLUTION:
NOTE: The solutions are expressed in RegEx pattern. Udacity uses these patterns to check the given answer
Solution
Gather: Unzip Solution